package com.bydq.patrolsystem.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author 写代码是不可能写代码的啦~~
 * @since 2020-05-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "ps_user",resultMap = "psUserMap")
public class PsUser implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("userCode")
    private String userCode;

    @TableField("userName")
    private String userName;

    @TableField(value = "userPassword",fill = FieldFill.INSERT)
    private String userPassword;

    private String sex;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 入职日期
     */
    @TableField("entryDate")
    private Date entryDate;

    /**
     * 离职日期
     */
    @TableField("dimissionDate")
    private Date dimissionDate;

    @TableField("phoneTel")
    private String phoneTel;

    private String email;

    /**
     * 注册时间
     */
    @TableField(value = "creationTime",fill = FieldFill.INSERT)
    private Date creationTime;

    /**
     * 最后登录时间
     */
    @TableField("lastLoginTime")
    private Date lastLoginTime;

    @TableField("createdBy")
    private String createdBy;

    /**
     * 最后修改时间
     */
    @TableField(value = "lastUpdateTime",fill = FieldFill.INSERT_UPDATE)
    private Date lastUpdateTime;

    /**
     * 使用状态1为正常0为冻结
     */
    @TableField("userStatus")
    private Integer userStatus;

    /**
     * 所属角色
     */
    @TableField("roleId")
    private Long roleId;


    @TableField(exist = false)
    private PsRole role;

}
